var arr = [
    {
        "name":"yuonly",
        "password":"123123"
    },
    {
        "name":"lazhou",
        "password":"2222222"
    }
]
// console.log(typeof arr)
// 把json数据类型的变量，转化成json格式的字符串
var fs = require('fs')

var data = JSON.stringify(arr)

fs.writeFile('./arr.js',data,function(err){
    if(!err){
        console.log('write success')
    }
})